<div class="campaigns" ui-view="container">
    <ol class="breadcrumb" style="font-size: 12px">
        <li>广告中心</li>
        <li class="tittle-color" ui-sref="campaigns">广告投放</li>
        <li>推广组</li>
    </ol>

    <div class="clearfix mt-10">
        <label class="title">
            <label>A</label>
            <span>{{title.advShortName}}</span>
        </label>
        <label class="title">
            <label>C</label>
            <span>{{title.campaignName}}</span>
        </label>
        <label class="title" ng-if="title.groupName">
            <label>G</label>
            <span>{{title.groupName}}</span>
        </label>
    </div>
    <div class="panel">
        <div class="panel-heading panel-style">
            <div class="row panel-row">
                <!--<div class="col-lg-3">-->
                    <!--<div class="input-group input-group-sm">-->
                        <!--<input type="text" class="form-control" name="keyword" ng-model="keyword" placeholder="搜索">-->
						<!--<span class="input-group-btn btn-bearch">-->
							<!--<button class="btn btn-default" type="button" ng-click="searchClick(keyword)">-->
                                <!--<i class="glyphicon glyphicon-search"></i>-->
                            <!--</button>-->
						<!--</span>-->
                    <!--</div>-->
                <!--</div>-->
                 <div class="search-operation pull-right">
                     <a ui-sref="campaigns.promotionGroup.detail"  class="btn">
                         <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>
                     </a>
                     <a href="javascript:void(0);" class="btn" ng-click="deleteGroup()">
                         <span class="glyphicon glyphicon-trash" aria-hidden="true"></span>
                     </a>
                 </div>
            </div>
        </div>
        <div class="table-responsive">
            <table class="table table-bordered table-hover">
                <thead>
                <tr>
                    <th>选择</th>
                    <th>序号	</th>
                    <th>ID</th>
                    <th>广告推广组</th>
                    <th>广告创意</th>
                    <th>展示</th>
                    <th>点击</th>
                    <th>点击率</th>
                    <th>独立展示</th>
                    <th>独立点击</th>
                    <th>独立点击率</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                <tr ng-repeat="item in lists">
                    <td><input type="checkbox" ng-model="item.checked" class="magic-checkbox" id="{{'lists' + ($index + 1)}}">
                        <label for="{{'lists' + ($index + 1)}}"></label>
                    </td>
                    <td>{{(paginationPromotion.currentPage - 1) * paginationPromotion.itemsPerPage + $index + 1}}</td>
                    <td>{{item.groupId}}</td>
                    <td><a ui-sref="campaigns.promotionGroup.detail({groupId:item.groupId,campaignsId:search.campaignsId})" ui-sref-opts="{inherit:false}">{{item.groupName}}</a></td>
                    <td><a ui-sref="campaigns.promotionGroup.creatives({campaignsId:search.campaignsId,groupId:item.groupId,pageNo:1,pageSize:10})">{{item.count ? item.count : "---"}}</a></td>
                    <td>{{item.cpm == 0 ? "---" : item.cpm}}</td>
                    <td>{{item.clickNum == 0 ? "---" : item.clickNum}}</td>
                    <td>{{item.clickRate == 0 ? "---" : (item.clickRate * 100).toFixed(2) + "%"}}</td>
                    <td>{{item.distinctCpm == 0 ? "---" : item.distinctCpm}}</td>
                    <td>{{item.distinctClickNum == 0 ? "---" : item.distinctClickNum}}</td>
                    <td>{{item.distinctClickRate == 0 ? "---" :(item.distinctClickRate * 100).toFixed(2) + "%"}}</td>
                    <td>
						<span ng-class="{'text-success': item.status == 4, 'text-danger': item.status == 3}">
							{{table[item.status]}}
						</span>
                    </td>
                    <td>
                        <a href="javascript:void(0);" ng-click="changeStatus(item)">
                            {{item.status == 3 ? "执行" : "暂停"}}
                        </a>
                        <a ui-sref="campaigns.promotionGroup.statistics({groupId:item.groupId,pageNo:1,pageSize:10})" class="ml-10">统计</a>
                    </td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
    <div class="panel-footer">
        <s-pagination conf="paginationPromotion"></s-pagination>
    </div>
    <!--<a ui-sref="campaigns.detail({campaignsId:1})"  ui-sref-opts="{inherit:false}">aaaaa</a>-->
</div>
